<script type="text/javascript" src="/admins/js/jquery/jquery.PrintArea.js"></script>
<link type="text/css" href="/admins/css/deletelist.css" rel="stylesheet" />
<div class="cktable" id="pbody">
    <h1>打印|过期和丢弃物品出库</h1>
    <table style="text-align:left">
            <tr>
            <th class="lipd1">
                    <div>编号</div>
            </th>
            <th class="lipd2">
                    <div>物品信息</div>
            </th>
            <th class="lipd3">
                <div>仓库号</div>
            </th>
            <th class="lipd4">
                   <div >净重(KG)</div>
            </th>
            <th class="lipd5">
                   <div >体积(KG)</div>
            </th>
            <th class="lipd6">
                    <div>库位</div>
            </th>
        </tr>
        <?php foreach ($this->StoreItemList as $Item) { ?> 
            <tr>
           
            <td class="lipd1">
                    <p><?php echo $Item->barcode; ?></p>                    
            </td>
            <td class="lipd2">
        <?php $str=preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.'0'.'}'.   
                         '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.'15'.'}).*#s',   
                         '$1',$Item->productName) ?>
                            <h2 ><?php echo (mb_strlen($Item->productName)/3)<=15 ? $str : $str.'...';//echo $Item->productName; ?></h2>
            </td>
            
            <td class="lipd3">
                    <p><?php echo $Item->userinfo!=null?$Item->userinfo->storeno:"用户出错"; ?></p>
            </td>
         
            
            <td class="lipd4">
                    <?php echo $Item->weight?$Item->weight/1000:"暂无";?>
            </td>
            <td class="lipd5">
                    <?php echo $Item->volumeWeight?$Item->volumeWeight/1000:"暂无"; ?>
            </td>
            
            <td class="lipd6">
                    <p><?php echo $Item->locationNo?$Item->locationNo:"暂无"?></p>
                
            </td>
        </tr>
        <?php } ?>
        <?php 
            if(!$this->StoreItemList){
                echo "<font size='4' color='red'>暂无数据</font>";
            }
        ?>               
    </table>
    <div style="line-height:30px;"><p>本次出库清单数量为<?php echo count($this->StoreItemList) ?>个</p></div>
</div> 
<div style="height:70px;">
 <input class="button" id="print" name='print' type="button" value="打印" style="width:80px;height:32px;margin-top:20px;margin-left:30px" />
</div>
<script type="text/javascript">
    $('#print').click(function(){
        $("#pbody").printArea(); 
        
    });
</script>